/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/applyforbackcard_main.tpl");
    require("./assets/css/applyforbackcard_main.css");

    //business

    //component
    var backCardSubnavComp = require("./component/backCardSubnavComp"); 
    var backCardGridComp = require("./component/backCardGridComp");
    var backCardFormComp = require("./component/backCardFormComp");
    var backCardCouponGrid = require("./component/backCardCouponGrid");
    var ApprovalUI = require("approvalUI");
    //constant
    var constant = require("./constant/backCardConstant");

    //handler
    var handler = require("./handler/backCardEvents");
    var service = require("./service/backCardSvc");

    //store

    var App = ELView.extend({
        attrs: {
            template: template
        },
        handler: handler,
        service: service,
        constant:constant,
        initComponent: function (params, widget) {
        	backCardSubnavComp.initComponent(params, widget);
        	backCardGridComp.initComponent(params, widget);
        	backCardFormComp.initComponent(params, widget);
        	backCardCouponGrid.initComponent(params, widget);
        	
        	var  approvalUI = new ApprovalUI({
				parentNode : ".J-applicategrid",
			});
			approvalUI.render();
			this.set("approvalUI",approvalUI);
        },
        afterInitComponent: function (params, widget) {
            
        }
    });

    module.exports = App;
});
